home *** CD-ROM | disk | FTP | other *** search
/ NeXT Enterprise Objects Framework 1.1 / NeXT Enterprise Objects Framework 1.1.iso / NextDeveloper / Headers / foundation / NXAutoreleaseConnection.h < prev   
Encoding:
C/C++ Source or Header  |  1995-02-04  |  840 b   |  31 lines

  1. /*
  2.    NXAutoreleaseConnection.h created by Richard Williamson on Fri 9-Dec-1994
  3.    Copyright (c) 1995, NeXT, Inc.  All rights reserved.
  4.  
  5.    Modifications by enoyau Tue 31-Jan-1995
  6.  
  7.    A subclass of NXConnection that allows autoreleased objects to be
  8.    correctly released in non-appkit servers.  This object should be used
  9.    something like this:
  10.  
  11.    int main(int argc, char *argv[])
  12.    {
  13.        id aServer;
  14.        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  15.  
  16.        aServer = [[DOServer alloc] init];
  17.        connection = [NXAutoreleaseConnection registerRoot: aServer withName:"AUTORELEASED_DO"];
  18.        [connection runWithTimeout: -1];  // or [connection run];
  19.        [aServer free];
  20.        [pool release];
  21.        exit(0);
  22.    }
  23. */
  24.  
  25.  
  26. #import <remote/NXConnection.h>
  27.  
  28. @interface NXAutoreleaseConnection : NXConnection
  29. @end
  30.  
  31.